Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document process.versions.modules #9901

Closed
wants to merge 2 commits into from

Conversation

kzurawel
Copy link
Contributor

@kzurawel kzurawel commented Dec 1, 2016

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc process

Description of change

This commit adds a description of process.versions.modules,
based on the comment in src/node_version.h lines 47-50.

This commit adds a description of `process.versions.modules`,
based on the comment in `src/node_version.h` lines 47-50.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Dec 1, 2016
@@ -1651,7 +1651,9 @@ added: v0.2.0
* {Object}

The `process.versions` property returns an object listing the version strings of
Node.js and its dependencies.
Node.js and its dependencies. `process.versions.modules` indicates the current
ABI version, which is increased whenever a C++ API changes. Node.js will refuse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I'm not sure if we have something in the docs that explains ABI, but if we do, making ABI a link to that explanation would be great.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be more of a "In addition, the modules property indicates ...", because this version contradicts the earlier sentence, the modules property is not a version of Node.js or its dependencies.

Perhaps it would be even better by enumerating each individual property, and describing it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's nothing in the docs that explains ABI currently. Could be a good addition to https://nodejs.org/dist/latest-v7.x/docs/api/addons.html at some point (/cc @nodejs/documentation). I wouldn't make it a condition for landing this PR tho

@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 6, 2016
@sam-github
Copy link
Contributor

@kzurawel are you still working on this?

@kzurawel
Copy link
Contributor Author

I'm still "working" on this, but I'm not sure what needs to be done at this point.

@sam-github
Copy link
Contributor

You need to read all comments, and if they suggest a change, implement it or explain why not. If they ask a question, answer it as a comment, or answer implicitly by pushing to the PR.

Specifically, in #9901 (comment)

I said:

I think this should be more of a "In addition, the modules property indicates ...", because this version contradicts the earlier sentence, the modules property is not a version of Node.js or its dependencies.

You should do this, or something similar, or comment on why you don't think it should be done.

Perhaps it would be even better by enumerating each individual property, and describing it?

This is phrased as a question, so you can answer it, or just do what I suggeest and change the doc format, or not change the doc format if you don't have the time or don't think its a good idea.

@Trott
Copy link
Member

Trott commented Dec 21, 2016

@kzurawel Are you still working on this?

(If not, does anyone else want to take it over and get it across the finish line?)

@kzurawel
Copy link
Contributor Author

I think that's all, I'll leave describing the other properties for future work.

@Trott
Copy link
Member

Trott commented Dec 22, 2016

@sam-github Looks good to you?

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nit, thanks for this!

Node.js and its dependencies.
Node.js and its dependencies. In addition, `process.versions.modules` indicates
the current ABI version, which is increased whenever a C++ API changes. Node.js
will refuse to load native modules built for an older `modules` value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This sounds like Node will load native modules built for newer modules values, which isn’t the case… maybe something like for a different fits better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node/src/node_version.h

Lines 46 to 52 in e03ee71

/**
* When this version number is changed, node.js will refuse
* to load older modules. This should be done whenever
* an API is broken in the C++ side, including in v8 or
* other dependencies.
*/
#define NODE_MODULE_VERSION 51 /* Node.js v7.0.0 */

Documentation text mirrors the only available documentation for this property.... an in-source comment. @addaleax are you saying the comment is wrong?

If so, this PR should change both the comment and the docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sam-github No, I didn’t say the current text is wrong. It’s just incomplete and might therefore be misleading.

If so, this PR should change both the comment and the docs.

No objections to that, but, like, this isn’t worth holding up the PR or anything imho.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so text should be something like "Node.js will refuse to load modules that weren't compiled against its own
module ABI number."

@Trott
Copy link
Member

Trott commented Dec 23, 2016

Landed in f368eee.

I'll update the text further (based on the back-and-forth between @addaleax and @sam-github) in a subsequent PR.

@Trott Trott closed this Dec 23, 2016
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 23, 2016
This commit adds a description of `process.versions.modules`,
based on the comment in `src/node_version.h` lines 47-50.

PR-URL: nodejs#9901
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
targos pushed a commit that referenced this pull request Dec 26, 2016
This commit adds a description of `process.versions.modules`,
based on the comment in `src/node_version.h` lines 47-50.

PR-URL: #9901
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Dec 27, 2016
Trott added a commit to Trott/io.js that referenced this pull request Dec 28, 2016
Trott added a commit to Trott/io.js that referenced this pull request Dec 28, 2016
PR-URL: nodejs#10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: nodejs#9901 (comment)
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
This commit adds a description of `process.versions.modules`,
based on the comment in `src/node_version.h` lines 47-50.

PR-URL: #9901
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
This commit adds a description of `process.versions.modules`,
based on the comment in `src/node_version.h` lines 47-50.

PR-URL: #9901
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
PR-URL: nodejs#10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: nodejs#9901 (comment)
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
PR-URL: nodejs#10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: nodejs#9901 (comment)
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 24, 2017
PR-URL: nodejs#10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: nodejs#9901 (comment)
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
PR-URL: nodejs#10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: nodejs#9901 (comment)
MylesBorins pushed a commit that referenced this pull request Mar 7, 2017
PR-URL: #10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: #9901 (comment)
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
PR-URL: #10419
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refs: #9901 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants